package com.dayaokeji.rhythmschoolstudent.client.common.vote.adapter;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dayaokeji.rhythmschoolstudent.R;
import com.dayaokeji.rhythmschoolstudent.utils.DateUtils;
import com.dayaokeji.rhythmschoolstudent.utils.ObjectUtils;
import com.dayaokeji.rhythmschoolstudent.utils.UserUtils;
import com.dayaokeji.server_api.domain.Vote;

/**
 * Created by Zeno on 2017/10/8.
 * 投票adapter
 */

public class VoteAdapter extends BaseQuickAdapter<Vote,BaseViewHolder> {


    public VoteAdapter() {
        super(R.layout.item_vote_list, null);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, Vote vote) {

        baseViewHolder.setText(R.id.tv_title,vote.getTitle()+"("+vote.getVotedName()+")");
        baseViewHolder.setText(R.id.tv_create_time, DateUtils.format(vote.getCreateTime(),DateUtils.FORMAT_DATE));
        baseViewHolder.setText(R.id.tv_status,vote.getStatusName());
    }


}
